﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Domain;

namespace Clannan.Models.JsonModel
{
    public class NoteBookJsonModel 
    {
        private int id;
        public int ID
        {
            get { return id; }
            set { id = value; }
        }

        private string name;
        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        private string areasort;
        public string AreaSort
        {
            get { return areasort; }
            set { areasort = value; }
        }

        /// <summary>
        /// 将对象复制给JsonModel类，防止序列化时会出现重复引用
        /// </summary>
        public NoteBookJsonModel Copy(NoteBookJsonModel notebookJsonModel,NoteBook notebook)
        {
            notebookJsonModel.ID = notebook.ID;
            notebookJsonModel.Name = notebook.Name;
            notebookJsonModel.AreaSort = notebook.AreaSort;
            return notebookJsonModel;
        }


    }
}